package com.dot.dominion.domain;


public class Card {  
  	protected String name;			//Name of the card
  	protected int pictureId;		//Picture ID of the card
  	protected int boardId;			//Board-picture ID of the card
	protected int cost;				//In-play cost of the card
	protected int victoryPoint;		//Victory Point value
	protected int treasure;			//Treasure value
	
	/**
	 * Victory & Treasure card constructor
	 * 
	 * @param label					Name of card
	 * @param value					Cost of card
	 * @param victoryPointValue		Victory Point value
	 * @param treasureValue			Treasure value
	 */
	public Card( String label, int picId, int boardId, int value,
								int victoryPointValue, int treasureValue ) {		
		name = new String( label );
		this.boardId = boardId;
		pictureId = picId;
		cost = value;
		victoryPoint = victoryPointValue;
		treasure = treasureValue;
	}
	
	/**
	 * Card-Copy Constructor
	 * 
	 * Used for constructing another card based on the original card
	 * 
	 * @param otherCard		The card to copy
	 */
	public Card( Card otherCard ) {
		name = new String( otherCard.name );
		pictureId = otherCard.pictureId;
		boardId = otherCard.boardId;
		cost = otherCard.cost;
		victoryPoint = otherCard.victoryPoint;
		treasure = otherCard.treasure;
	}

	/**
	 * Obtain the board-picture ID of the card
	 * 
	 * @return	The board-picture ID of the card
	 */
	public int getBoardId() {
		return boardId;
	}
	
	/**
	 * Find the cost of the card.
	 * 
	 * @return	The cost-value of the card.
	 */
	public int getCost() {
		return cost;
	}
	
	/**
	 * Get the name of the card
	 * 
	 * @return	The card's name/label.
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Get the picture name of the card
	 * 
	 * @return	The card's picture name
	 */
	public int getPictureId() {
		return pictureId;
	}
	
	/**
	 * Get the treasure value of the card
	 * 
	 * @return	The treasure denomination of this card
	 */
	public int getTreasureValue() {
		return treasure;
	}
	
	/**
	 * Get the victory point value of the card
	 * 
	 * @return	The victory point value of this card
	 */
	public int getVictoryPointValue() {
		return victoryPoint;
	}
	
	/**
	 * Flag if this is a Treasure card
	 * 
	 * @return	true, if it's a treasure card
	 * 			false, otherwise
	 */
	public boolean isTreasureCard() {
		return ( treasure > 0 );
	}
	
	/**
	 * Flag if this is a Victory Card
	 * 
	 * @return	true, if it's a Victory card
	 * 			false, otherwise
	 */
	public boolean isVictoryCard() {
		return ( victoryPoint > 0 );
	}
}